package com.his.his_system.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.his.his_system.domain.DzmHisRegisteredfee;
import com.his.his_system.domain.DzmHisRegisteredfeeSub;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 挂号费用表
 * @TableName dzm_his_registeredfee
 */
@TableName(value ="dzm_his_registeredfee")
@Data
public class RegisteredfeeVo implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer regId;

    /**
     * 用户id
     */
    private Integer mid;

    /**
     * 公司ID
     */
    private Integer companyId;

    /**
     * 挂号费用名称
     */
    private String registeredfeeName;

    /**
     * 金额
     */
    private BigDecimal registeredfeeFee;

    /**
     * 子费用总数
     */
    private BigDecimal registeredfeeSubFee;

    /**
     * 挂号费用总金额
     */
    private BigDecimal registeredfeeAggregateAmount;

    /**
     * 子费用数量
     */
    private Integer numberofsub;

    /**
     * 创建时间
     */
    private Integer createTime;

    private List<DzmHisRegisteredfeeSub> subReg;



    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RegisteredfeeVo other = (RegisteredfeeVo) that;
        return (this.getRegId() == null ? other.getRegId() == null : this.getRegId().equals(other.getRegId()))
            && (this.getMid() == null ? other.getMid() == null : this.getMid().equals(other.getMid()))
            && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
            && (this.getRegisteredfeeName() == null ? other.getRegisteredfeeName() == null : this.getRegisteredfeeName().equals(other.getRegisteredfeeName()))
            && (this.getRegisteredfeeFee() == null ? other.getRegisteredfeeFee() == null : this.getRegisteredfeeFee().equals(other.getRegisteredfeeFee()))
            && (this.getRegisteredfeeSubFee() == null ? other.getRegisteredfeeSubFee() == null : this.getRegisteredfeeSubFee().equals(other.getRegisteredfeeSubFee()))
            && (this.getRegisteredfeeAggregateAmount() == null ? other.getRegisteredfeeAggregateAmount() == null : this.getRegisteredfeeAggregateAmount().equals(other.getRegisteredfeeAggregateAmount()))
            && (this.getNumberofsub() == null ? other.getNumberofsub() == null : this.getNumberofsub().equals(other.getNumberofsub()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRegId() == null) ? 0 : getRegId().hashCode());
        result = prime * result + ((getMid() == null) ? 0 : getMid().hashCode());
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getRegisteredfeeName() == null) ? 0 : getRegisteredfeeName().hashCode());
        result = prime * result + ((getRegisteredfeeFee() == null) ? 0 : getRegisteredfeeFee().hashCode());
        result = prime * result + ((getRegisteredfeeSubFee() == null) ? 0 : getRegisteredfeeSubFee().hashCode());
        result = prime * result + ((getRegisteredfeeAggregateAmount() == null) ? 0 : getRegisteredfeeAggregateAmount().hashCode());
        result = prime * result + ((getNumberofsub() == null) ? 0 : getNumberofsub().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "DzmHisRegisteredfee{" +
                "regId=" + regId +
                ", mid=" + mid +
                ", companyId=" + companyId +
                ", registeredfeeName='" + registeredfeeName + '\'' +
                ", registeredfeeFee=" + registeredfeeFee +
                ", registeredfeeSubFee=" + registeredfeeSubFee +
                ", registeredfeeAggregateAmount=" + registeredfeeAggregateAmount +
                ", numberofsub=" + numberofsub +
                ", createTime=" + createTime +
                '}';
    }
}